package com.artisan.domain.repositoryInterface;

import com.artisan.domain.entity.MStartPage;
import com.artisan.domain.entity.MVersion;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * 版本数据访问接口
 */
@Repository
public interface IVersionRepository extends JpaRepository<MVersion, Integer> {
    @Query(value = "select c from MVersion c where c.platform=:platform and c.number=:number and c.status=1 order by c.addDate desc ")
    Page<MVersion> findList(@Param("platform")int platform, @Param("number")String number, Pageable pageable);
}
